<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理球员 - 村姑俱乐部</title>
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
    <header>
        <div class="logo-container">
            <img id="club-logo" src="https://via.placeholder.com/150" alt="村姑俱乐部徽章" class="club-logo">
            <h1>村姑俱乐部</h1>
        </div>
        <nav>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="admin.html" class="active">管理球员</a></li>
            </ul>
        </nav>
    </header>

    <main>
        <section class="admin-section">
            <h2>球员管理</h2>
            
            <div class="admin-controls">
                <button id="add-player-btn" class="btn primary-btn">添加新球员</button>
                <button id="change-logo-btn" class="btn secondary-btn">更换俱乐部徽章</button>
                <input type="file" id="logo-upload" accept="image/*" style="display: none;">
            </div>

            <div id="add-player-form" class="player-form" style="display: none;">
                <h3>添加新球员</h3>
                <form id="player-form">
                    <div class="form-group">
                        <label for="player-name">姓名:</label>
                        <input type="text" id="player-name" required>
                    </div>
                    <div class="form-group">
                        <label for="player-number">球衣号码:</label>
                        <input type="number" id="player-number" required min="1" max="99">
                    </div>
                    <div class="form-group">
                        <label for="player-position">位置:</label>
                        <select id="player-position" required>
                            <option value="门将">门将</option>
                            <option value="后卫">后卫</option>
                            <option value="中场">中场</option>
                            <option value="前锋">前锋</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="player-age">年龄:</label>
                        <input type="number" id="player-age" required min="16" max="45">
                    </div>
                    <div class="form-group">
                        <label for="player-nationality">国籍:</label>
                        <input type="text" id="player-nationality" required>
                    </div>
                    <div class="form-group">
                        <label for="player-description">简介:</label>
                        <textarea id="player-description" rows="4" required></textarea>
                    </div>
                    <div class="form-group">
                        <label>能力值:</label>
                        <div class="stats-inputs">
                            <div class="stat-input">
                                <label for="player-pace">速度:</label>
                                <input type="number" id="player-pace" required min="1" max="99" value="50">
                            </div>
                            <div class="stat-input">
                                <label for="player-shooting">射门:</label>
                                <input type="number" id="player-shooting" required min="1" max="99" value="50">
                            </div>
                            <div class="stat-input">
                                <label for="player-passing">传球:</label>
                                <input type="number" id="player-passing" required min="1" max="99" value="50">
                            </div>
                            <div class="stat-input">
                                <label for="player-dribbling">盘带:</label>
                                <input type="number" id="player-dribbling" required min="1" max="99" value="50">
                            </div>
                            <div class="stat-input">
                                <label for="player-defending">防守:</label>
                                <input type="number" id="player-defending" required min="1" max="99" value="50">
                            </div>
                            <div class="stat-input">
                                <label for="player-physical">身体素质:</label>
                                <input type="number" id="player-physical" required min="1" max="99" value="50">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="player-image">球员照片:</label>
                        <input type="file" id="player-image" accept="image/*">
                    </div>
                    <div class="form-buttons">
                        <button type="submit" class="btn primary-btn">保存</button>
                        <button type="button" id="cancel-add" class="btn secondary-btn">取消</button>
                    </div>
                </form>
            </div>

            <div class="player-list-container">
                <h3>现有球员</h3>
                <div id="player-list" class="player-list">
                    <!-- 球员列表将通过JavaScript动态生成 -->
                </div>
            </div>
        </section>
    </main>

    <footer>
        <div class="footer-content">
            <div class="footer-logo">
                <img id="footer-club-logo" src="https://via.placeholder.com/100" alt="村姑俱乐部徽章" class="club-logo-small">
                <h3>村姑俱乐部</h3>
            </div>
            <div class="footer-links">
                <h4>快速链接</h4>
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="admin.html">管理球员</a></li>
                </ul>
            </div>
            <div class="footer-contact">
                <h4>联系我们</h4>
                <p><i class="fas fa-envelope"></i> contact@cungujulebu.com</p>
                <p><i class="fas fa-phone"></i> +86 123 4567 8910</p>
            </div>
        </div>
        <div class="footer-bottom">
            <p>&copy; 2025 村姑俱乐部. 保留所有权利.</p>
        </div>
    </footer>

    <script src="data.js"></script>
    <script src="script.js"></script>
</body>
</html>